package com.simtop.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.simtop.dao.ExperimentScoreDao;
import com.simtop.dao.OperateDao;
import com.simtop.pojo.Operate;
import com.simtop.pojo.experiment.ExperimentScore;
import com.simtop.pojo.experiment.ExperimentScoreExport;
import com.simtop.service.ExperimentScoreService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author lvyongwei
 */
@Service
public class ExperimentScoreServiceImpl implements ExperimentScoreService {

    @Autowired
    private ExperimentScoreDao experimentScoreDao;

    /**
     * 插入实验成绩
     * @param experimentScore
     * @return
     */
    @Override
    public boolean insertExperimentScore(ExperimentScore experimentScore) {
        experimentScore.setCreateTime(new Date());
        return experimentScoreDao.insertExperimentScore(experimentScore);
    }

    /**
     * 实验报告查询
     * @return
     */
    @Override
    public List<ExperimentScore> getAllExperimentScore(ExperimentScore experimentScore) {
        return experimentScoreDao.getAllExperimentScore(experimentScore);
    }

    /**
     * 实验报告导出
     * @return
     */
    @Override
    public List<ExperimentScoreExport> experimentExport(String beginTime, String endTime, String school) {
        return experimentScoreDao.experimentExport(beginTime, endTime, school);
    }
}
